home *** CD-ROM | disk | FTP | other *** search
/ Delphi Magazine Collection 2001 / Delphi Magazine Collection 20001 (2001).iso / DISKS / ISSUE23 / CLINIC / NEWMSGU.PAS < prev   
Pascal/Delphi Source File  |  1997-04-25  |  918b  |  46 lines

  1. unit NewMsgU;
  2.  
  3. interface
  4.  
  5. uses
  6.   WinProcs, WinTypes, Messages, SysUtils, Classes, Graphics, Controls,
  7.   Forms, Dialogs, StdCtrls;
  8.  
  9. type
  10.   TForm1 = class(TForm)
  11.     BtnNormalMessageDlg: TButton;
  12.     BtnNewMessageDlg: TButton;
  13.     procedure BtnNormalMessageDlgClick(Sender: TObject);
  14.     procedure BtnNewMessageDlgClick(Sender: TObject);
  15.   private
  16.     { Private declarations }
  17.   public
  18.     { Public declarations }
  19.   end;
  20.  
  21. var
  22.   Form1: TForm1;
  23.  
  24. implementation
  25.  
  26. uses
  27.   MsgDlgs;
  28.  
  29. {$R *.DFM}
  30.  
  31. procedure TForm1.BtnNormalMessageDlgClick(Sender: TObject);
  32. begin
  33.   if MessageDlg('Shall I beep?', mtConfirmation,
  34.      [mbYes, mbNo], 0) = mrYes then
  35.     MessageBeep(Cardinal(-1))
  36. end;
  37.  
  38. procedure TForm1.BtnNewMessageDlgClick(Sender: TObject);
  39. begin
  40.   if MessageDlgDef('Shall I beep?', mtConfirmation,
  41.      [mbYes, mbNo], mrNo, 0) = mrYes then
  42.     MessageBeep(Cardinal(-1))
  43. end;
  44.  
  45. end.
  46.